/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.sys.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.service.TreeService;
import com.thinkgem.jeesite.common.utils.StringUtils;
import com.thinkgem.jeesite.modules.sys.entity.Column;
import com.thinkgem.jeesite.modules.sys.dao.ColumnDao;

/**
 * 列内容管理Service
 * @author Genie
 * @version 2016-05-11
 */
@Service
@Transactional(readOnly = true)
public class ColumnService extends TreeService<ColumnDao, Column> {

	public Column get(String id) {
		return super.get(id);
	}
	
	public List<Column> findList(Column column) {
		if (StringUtils.isNotBlank(column.getParentIds())){
			column.setParentIds(","+column.getParentIds()+",");
		}
		return super.findList(column);
	}
	
	@Transactional(readOnly = false)
	public void save(Column column) {
		super.save(column);
	}
	
	@Transactional(readOnly = false)
	public void delete(Column column) {
		super.delete(column);
	}
	
}